<template>
    <view>
     <u-navbar :is-back="true" title="常见问题" back-text="">
      <view
        class="slot-right"
        style="width: 100%; display: flex; justify-content: flex-end"
      >
        <view style="padding: 0rem 0.5rem;display: flex;
align-items: center;">
            <!-- <view style="
font-size: 0.75rem;
font-family: PingFang SC;
font-weight: 300;
color: #02AF74;" >员工规则</view> -->

            <!-- <image style="width: 0.7rem;
height: 0.5rem;
padding: 0.3rem;" src="../../../style/image/my/bottomArrow.jpg" alt=""> -->
        </view>
      </view>
    </u-navbar>
    <view  @click="goDetaile(item)" class="item"  v-for="(item,index) in allData" :key="index" >
      <span>{{item.name}}</span>
      <span>
        <image class="image" src="../../style/image/cargo/back.png" alt="">
      </span>
    </view>
    <!-- <view class="item">
      <span>收益查询入口在哪里?</span>
      <span>
       <image class="image" src="../../style/image/cargo/back.png" alt="">
      </span>
    </view>
    <view class="item">
      <span>间接激活代理有分润收益吗？</span>
      <span>
       <image class="image" src="../../style/image/cargo/back.png" alt="">
      </span>
    </view>
    <view class="item">
      <span>收益查询入口在哪里？</span>
      <span>
        <image class="image" src="../../style/image/cargo/back.png" alt="">
      </span>
    </view> -->
    </view>
</template>

<script lang='ts' >
import { Component, Prop, Vue, Watch, Emit } from "vue-property-decorator";

import { findCommonProblem } from "../../utils/uniApi";

@Component({
  //   @Component  是一个装修器   不可以在下面写语句
  name: "test",
})
export default class extends Vue {
  @Prop({
    type: String, // 父组件传递给子组件的数据类型
    required: false, // 是否必填
    default: " ", // 默认值， 如果传入的是 Object，则要 default: ()=>({}) 参数为函数
  })
  msg!: string;


  public allData:any=[]

  public queryKey = "";

  created() {}

  mounted() {
    //  console.log('父组件传递的参数:',this.$parent)   //暂时不考虑

    this.findCommonProblemM()
  }

  findCommonProblemM() {
    let params = {
      pageNo: 1,
      pageSize: 20,
      queryKey: this.queryKey,
      userId:uni.getStorageSync("userId") == ""? "" : parseInt(uni.getStorageSync("userId")),
    };
    findCommonProblem(params).then((res: any) => {

      console.log(res, "q2131231231");

      this.allData=res.data.data

    });
  }

  goDetaile(data:any){

      console.log('你好',data)

       uni.navigateTo({
          url: `./prombleDetailed?data=${JSON.stringify(data.description)}`,
         });

        // uni.navigateTo({
        //   url: `./prombleDetailed`,
        //  });


  }


}
</script>

<style  scoped>
.item {
  padding: 0.8rem 0.7rem;
  line-height: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  font-family: PingFang SC;
  font-weight: 400;
  color: #000000;
  border-top: 0.05rem #f3f5f7 solid;
  border-bottom: 0.08rem #f3f5f7 solid;
}
.image {
  width: 0.3rem;
  height: 0.57rem;
}
</style>